package com.douqu.game.core.e;


/**
 * Created by bean on 2017/8/1.
 */
public enum E_RechargeGoodsType implements BaseEnum {

    UNKNOWN(0, "无"),
    MOUTH_CARD(1,"月卡"),
    DIAMOND(2,"钻石"),
    OPEN_FUND(3,"开服基金"),
    DAILY_GIFT(4,"每日礼包"),
    NEW_SERVER_FUND(5,"新区基金"),
    WEEK_CARD(6,"周卡"),
    FLASH_SALE(7,"限时促销"),
    OPEN_SERVER_BOON(8,"开服红利"),
    ;

    int code;

    String msg;

    E_RechargeGoodsType(int code, String msg)
    {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }


    public static E_RechargeGoodsType forNumber(int type)
    {
        for(E_RechargeGoodsType goodsType : values())
        {
            if(goodsType.getCode() == type)
                return goodsType;
        }
        return E_RechargeGoodsType.UNKNOWN;
    }


}
